package com.lw.pojo;

/**
 * @author LW
 * @2020/9/26 13:00
 */
public class User {
    private String name;

    public User(String name) {
        this.name = name;
    }

    //无参构造是     隐式的 ‘只要没写有参构造就在
//    public User(){
//        System.out.println("User的无参构造！");
//    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void show(){
        System.out.println("name="+name);
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                '}';
    }
}
